<?
/**
	Function for parser url so remain query string don't remove only variabel string
	that used
	$url = coplete url form 
	$var_value= query string will be inserted
**/
function url_parser($url,$var_value){
	$vars=explode("=",$var_value);
	$variable=$vars[0];
	if(ereg("\?",$url)){
		$split_url=explode("?",$url);
		
		if(ereg("\&",$split_url[1])){
			$split_query_string=explode("&",$split_url[1]);
			foreach($split_query_string as $var){
				if(!ereg($variable,$var) && !ereg("result",$var))
					$sync_query.=$var."&";
			}
			$sync_query_sip=substr($sync_query,0,strlen($sync_query)-1);
			$urlcomplete=$split_url[0]."?".$sync_query_sip;
			$adj="&";
		}else{
			if(!ereg($variable,$split_url[1]) & !ereg("result",$split_url[1])){
				$urlcomplete=$split_url[0]."?".$split_url[1];
				$adj="&";
			}else
				$adj="?";
							
		}
		
	}else{
		$adj="?";
		$urlcomplete=$url;
	}
	
	return $urlcomplete.$adj.$var_value;
}
?>